"use strict";
cc._RF.push(module, '11d33ffLiRChrHY0igU3Ib8', 'Grid');
// scripts/Grid.ts

Object.defineProperty(exports, "__esModule", { value: true });
var _a = cc._decorator, ccclass = _a.ccclass, property = _a.property;
var Grid = /** @class */ (function (_super) {
    __extends(Grid, _super);
    function Grid() {
        var _this = _super !== null && _super.apply(this, arguments) || this;
        _this.GridBoarder = null;
        return _this;
    }
    Grid.prototype.onLoad = function () {
        var size = cc.view.getVisibleSize();
        var rows = Math.ceil(size.height / 50);
        var cols = Math.ceil(size.width / 50);
        for (var i = 0; i < rows; i++) {
            for (var j = 0; j < cols; j++) {
                var grid = cc.instantiate(this.GridBoarder);
                grid.x = j * 50 - size.width * 0.5 + 25;
                grid.y = i * 50 - size.height * 0.5 + 25;
                this.node.addChild(grid);
            }
        }
    };
    __decorate([
        property(cc.Prefab)
    ], Grid.prototype, "GridBoarder", void 0);
    Grid = __decorate([
        ccclass
    ], Grid);
    return Grid;
}(cc.Component));
exports.default = Grid;

cc._RF.pop();